package com.oak.broke.websocket;

import org.springframework.web.socket.WebSocketSession;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class WebSocketSessions {
    //能力端 客户端 session缓存
    public static Map<String, WebSocketSession> WEBSOCKET_SESSIONS = new ConcurrentHashMap<>();

    //客户端与能力session的关系
    public static Map<String, String> WEBSOCKET_SESSION_MAP = new ConcurrentHashMap<>();

    //两个会话之间的映射关系
    public static Map<String, String> WEBSOCKET_SESSION_IST_MAP = new ConcurrentHashMap<>();

    public static Map<String, String> WEBSOCKET_SESSION_5G_AST = new ConcurrentHashMap<>();

    //流式翻译 5G新通话
    public static Map<String, String> WEBSOCKET_TRANS_5G = new ConcurrentHashMap<>();

    public static Map<String, String> WEBSOCKET_SESSION_5G_TTS = new ConcurrentHashMap<>();

    public static Map<String, Map<String, String>> WEBSOCKET_SESSION_5G_TTS_HEADER = new ConcurrentHashMap<>();

    public static Map<String, String> WEBSOCKET_SESSION_YUEYU_MAP = new ConcurrentHashMap<>();

    public static Map<String, String> WEBSOCKET_SESSION_JIUTIAN_MAP = new ConcurrentHashMap<>();

    public static Set<String> JIUTIAN_STARY_SET = new HashSet<>();



    // sessionId 与前端交互  proxySessionId 与第三方ws交互
    // 模型会话session缓存
    public static Map<String, WebSocketSession> WEBSOCKET_SESSIONS_MODEL = new ConcurrentHashMap<>();
    // sessionId和proxySessionId对应关系
    public static Map<String, String> WEBSOCKET_SESSIONS_MODEL_MAP = new ConcurrentHashMap<>();
    // proxySessionId和sessionId对应关系
    public static Map<String, String> WEBSOCKET_SESSIONS_MODEL_PROXY_MAP = new ConcurrentHashMap<>();
    // 第三方ws返回的内容   proxySessionId:用户发来的消息
    public static Map<String, String> WEBSOCKET_SESSIONS_MESSAGE_MAP = new ConcurrentHashMap<>();
    // 回复的角色       proxySessionId
    public static Map<String, String> WEBSOCKET_SESSIONS_ROLE_MAP = new ConcurrentHashMap<>();
    // 用户发送的消息        sessionId
    public static Map<String, Map> WEBSOCKET_SESSIONS_SEND_MAP = new ConcurrentHashMap<>();



    // -------------------- rag问答 begin -------------------
    // 模型会话session缓存
    public static Map<String, WebSocketSession> WEBSOCKET_SESSIONS_RAG = new ConcurrentHashMap<>();
    // sessionId和proxySessionId对应关系
    public static Map<String, String> WEBSOCKET_SESSIONS_RAG_MAP = new ConcurrentHashMap<>();
    // proxySessionId和sessionId对应关系
    public static Map<String, String> WEBSOCKET_SESSIONS_RAG_PROXY_MAP = new ConcurrentHashMap<>();
    // 第三方ws返回的内容   proxySessionId
    public static Map<String, String> RAG_WEBSOCKET_SESSIONS_MESSAGE_MAP = new ConcurrentHashMap<>();
    // 用户发送的消息        sessionId
    public static Map<String, Map> RAG_WEBSOCKET_SESSIONS_SEND_MAP = new ConcurrentHashMap<>();
    // -------------------- rag问答 end -------------------
}
